﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AMS.DD35.DbLoader.Views;
using AMS.DD35.DbLoader.Models;

namespace AMS.DD35.DbLoader.Controllers
{
    class FeatController : EditorControllerBase, IFeatController
    {
        private IFeatModel _model;

        public FeatController()
        {
        }

        #region Initialization Methods
        protected override void InitializeFields()
        {
            // tightly couple here per MVC
            _model = new FeatModel();
            _browser = new BrowserDialog(this);
            _browser.NewButtonText = "New Feat";
            _browser.Text = "Feat Browser";

            IEnumerable<object> feats = _model.GetFeats();
            _browser.Populate(feats);
        }

        protected override void LoadEditor()
        {
            // TODO: prep editor to be Editor
            // Get data
            // Load data into Editor
            FeatEditor editor = new FeatEditor(this);
            // other load methods

            _editor = editor;
        }

        protected override void PrepNewEditor()
        {
            // prep editor to be New
            FeatEditor editor = new FeatEditor(this);

            _editor = editor;
        }
        #endregion
    }
}
